package com.kayt.cyberBar.company.business.entity.po;

import java.io.Serializable;
import javax.persistence.*;

import org.codehaus.jackson.annotate.JsonIgnore;


/**
 * The persistent class for the b_company_activity_rebate_item database table.
 * 
 */
@Entity
@Table(name="b_company_activity_rebate_item")
@NamedQuery(name="BCompanyActivityRebateItem.findAll", query="SELECT b FROM BCompanyActivityRebateItem b")
public class BCompanyActivityRebateItem implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private String code;
	private String createTime;
	private String rebateCode;
	private String itemCode;
	private String itemName;
	private String percent;
	private String price;
	private String rebateCash;
	private String updateTime;
	
	private BCompanyActivityRebate rebate;

	public BCompanyActivityRebateItem() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	@Column(name="CREATE_TIME")
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Column(name="REBATE_CODE")
	public String getRebateCode() {
		return rebateCode;
	}


	public void setRebateCode(String rebateCode) {
		this.rebateCode = rebateCode;
	}


	@Column(name="ITEM_CODE")
	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}


	@Column(name="ITEM_NAME")
	public String getItemName() {
		return this.itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}


	public String getPercent() {
		return this.percent;
	}

	public void setPercent(String percent) {
		this.percent = percent;
	}


	public String getPrice() {
		return this.price;
	}

	public void setPrice(String price) {
		this.price = price;
	}


	@Column(name="REBATE_CASH")
	public String getRebateCash() {
		return this.rebateCash;
	}

	public void setRebateCash(String rebateCash) {
		this.rebateCash = rebateCash;
	}


	@Column(name="UPDATE_TIME")
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}


	@ManyToOne(targetEntity = BCompanyActivityRebate.class, fetch = FetchType.LAZY)
	@JoinColumn(name="REBATE_CODE", referencedColumnName="CODE", nullable = false, insertable=false, updatable=false)
	@JsonIgnore
	public BCompanyActivityRebate getRebate() {
		return rebate;
	}


	public void setRebate(BCompanyActivityRebate rebate) {
		this.rebate = rebate;
	}

}